/*
 * Scheduler.h
 *
 *  Created on: Jan 13, 2010
 *      Author: artur
 */

#ifndef SCHEDULER_H_
#define SCHEDULER_H_

/*
 *
 */
#include <Object.h>

#include <irq/EventController.h>
#include <kiddie/kiddie.h>
#include <util/list.h>

namespace kernel
{
	namespace sys
	{
		namespace sched
		{

			class Scheduler: public Object, public kernel::irq::EventListener
			{

				public:
					Scheduler();
					~Scheduler();
					Scheduler &operator<< (kernel::cmd::CMD cmd);
					Scheduler &operator<< (task::Task *tsk);
					Scheduler &operator+= (task::Task *tsk);
					Scheduler &operator-= (task::Task *tsk);
					void onEvent(kernel::irq::Event *);

				private:
					::kernel::cmd::CMD SchedState;
			};

		}
	}
}

#endif /* SCHEDULER_H_ */
